@extends('admin')

@section('content')

        <p class="mb10">
            <a href="{{url('admin/financial/editftype/')}}" class="btn J_dialog" title="发布"><span class="add"></span>发布</a>
        </p>
        <div class="h_a">搜索</div>
        <div class="search_type cc mb10">
            <form action="{{url('admin/financial/type')}}" method="post" class="search_form">
                <label for="search_title">标题：</label><input type="text" name="keyword"       id="search_title" class="input length_2 mr10"/>
                {{ csrf_field() }}
                <button type="submit" class="btn">提交查询</button>
            </form>

        </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>类别名称</th>
                    <th>类别描述</th>
                    <th>父类</th>
                    <th>操作</th>

                </tr>
                </thead>
                <tbody>
            @foreach($items as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td style=" width: 280px;">{{$item->name}}</td>
                        <td style=" width: 280px;">{{$item->description}}</td>
                        <td style=" width: 280px;">@if($item->parentName) {{$item->parentName}}  @else 无 @endif</td>
                        <td>
                            <a href="{{url('admin/financial/editftype/'.$item->id)}}" title="编辑 " class="mr10 J_dialog">[编辑]</a>
                            <a href="{{url('admin/financial/delete/'.$item->id)}}" class="mr10 J_ajax_del">[删除]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$items->total()}} 条数据
        </div>

    </div>

@stop